import os
from dotenv import load_dotenv
from langchain_tavily import TavilySearch

# 加载.env文件
load_dotenv(dotenv_path="./config/config.env")

# 读取配置值
langsmith_tracing = os.getenv("LANGSMITH_TRACING")
langsmith_endpoint = os.getenv("LANGSMITH_ENDPOINT")
langsmith_api_key = os.getenv("LANGSMITH_API_KEY")
langsmith_project = os.getenv("LANGSMITH_PROJECT")
tavily_key = os.getenv("TAVILY_KEY")

os.environ["TAVILY_API_KEY"] = tavily_key


tool = TavilySearch(max_results=5, search_depth="advanced")
tools = [tool]
tool_msg = tool.invoke("LangGraph中的node是什么?")
print(tool_msg)